package com.yc.booktable.controller;


import com.yc.booktable.entity.Foodtype;
import com.yc.booktable.service.IFoodtypeService;
import com.yc.booktable.vo.Result;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.ResponseBody;

import javax.annotation.Resource;
import java.util.List;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author zbh
 * @since 2022-06-06
 */
@Controller
@RequestMapping("/foodtype")
public class FoodtypeController {
    @Resource
    private IFoodtypeService service;

    @GetMapping
    @ResponseBody
    public Result ftype(){
        List<Foodtype> list = service.list();
        return new Result(1,"获取成功",list);
    }
}

